package com.lanchetech.dao;

import com.lanchetech.bean.request.PageReq;
import com.lanchetech.bean.vo.CoinCountVO;
import com.lanchetech.bean.vo.CountByTimeVO;
import com.lanchetech.entity.CoinFlow;

import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface CoinFlowMapper {
    int deleteByPrimaryKey(Long id);

    int insert(CoinFlow record);

    int insertSelective(CoinFlow record);

    CoinFlow selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(CoinFlow record);

    int updateByPrimaryKey(CoinFlow record);

    int updateBatch(List<CoinFlow> list);

    int updateBatchSelective(List<CoinFlow> list);

    int batchInsert(@Param("list") List<CoinFlow> list);

    List<CoinFlow> findAllPage(PageReq req);

    List<CountByTimeVO> getCoinCountByType(@Param("type")Byte type, @Param("userId") Long userId);

    CoinCountVO getCoinCount(@Param("userId") Long userId);

    CoinFlow findOneByUserId(@Param("userId")Long userId);


}